# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=showmethekey
pkgver=1.5.0
pkgrel=1
pkgdesc="Show keys you typed on screen"
url="https://github.com/AlynxZhou/showmethekey"
arch="all"
license="Apache-2.0"
makedepends="
	eudev-dev
	gtk+3.0-dev
	json-glib-dev
	libevdev-dev
	libinput-dev
	meson
	"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/AlynxZhou/showmethekey/archive/v$pkgver/showmethekey-$pkgver.tar.gz
	dont-hardcode-bindir.patch
	cli-exec-wrapper.patch
	showmethekey-cli-exec
	"
options="!check"  # no tests provided

build() {
	abuild-meson \
		--bindir /usr/libexec \
		. output
	meson compile -j ${JOBS:-0} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	install -m755 "$srcdir"/showmethekey-cli-exec "$pkgdir"/usr/libexec/
}

sha512sums="
73b1dbb8239e9806f84270c593e41520a8937c7672eb17cef642d221bd21329277fa2887fa2832b5c087f83c6bf75d67dc8340792beb064ee36c1bdc4e099063  showmethekey-1.5.0.tar.gz
6e33f220ad12dc70b40840fed27902392230390113fb3edfc7cb1eed1b79f0cf80d4fd70bbe2960a823164e152d2d1ab4b811f2d7ebf2fd71e5da41d285a0e20  dont-hardcode-bindir.patch
d90caf88c7bd96e5e18523fca19092008e421e64ff50b2127dedccc2d88e44af693f9b2db3c72052b2c9ed74d9e47a0af05d5e452f296b35d6e5801fad85cbba  cli-exec-wrapper.patch
32cef0b0e175fb29c36284cb9c8a2952e2088688ebce34128e3760d6f9216346ccef73b3216fa982748038e31c25c6a59625966fa924557bbda7e3f66f09b23d  showmethekey-cli-exec
"
